// @ts-ignore
/* eslint-disable */
import request from "@/utils/request";

/** 此处后端没有提供注释 GET /blog/${param0} */
export async function getBlogVoById(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getBlogVOByIdParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBlogVO>(`/blog/${param0}`, {
    method: "GET",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/add */
export async function addBlog(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.addBlogParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong>("/blog/add", {
    method: "POST",
    params: {
      ...params,
      blogAddRequest: undefined,
      ...params["blogAddRequest"],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/collect */
export async function collectBlog(
  body: API.CollectBlogRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/blog/collect", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/comment */
export async function commentBlog(
  body: API.CommentBlogRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/blog/comment", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/comment/page */
export async function getBlogCommentPage(
  body: API.BlogCommentRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBlogCommentVO>("/blog/comment/page", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/delete */
export async function deleteBlog(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteBlogParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/blog/delete", {
    method: "POST",
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/like */
export async function likeBlog(
  body: API.LikeBlogRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>("/blog/like", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/list/page/vo */
export async function listBlogVoByPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listBlogVoByPageParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBlogVO>("/blog/list/page/vo", {
    method: "POST",
    params: {
      ...params,
      blogQueryRequest: undefined,
      ...params["blogQueryRequest"],
    },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/list/recommend */
export async function listBlogByRecommend(
  body: API.BlogQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageBlogVO>("/blog/list/recommend", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 GET /blog/recent/${param0} */
export async function getRecentBlogVoList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getRecentBlogVOListParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseListBlogVO>(`/blog/recent/${param0}`, {
    method: "GET",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /blog/view/${param0} */
export async function viewBlog(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.viewBlogParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(`/blog/view/${param0}`, {
    method: "POST",
    params: { ...queryParams },
    ...(options || {}),
  });
}
